<template>
  <div class="abc"></div>
  <a-button>默认按钮</a-button>
  <a-button type="primary" @click="msgClick">主要按钮</a-button>
  <a-button type="success">成功按钮</a-button>
  <a-button type="info">信息按钮</a-button>
  <a-button type="warning">警告按钮</a-button>
  <a-button type="danger">危险按钮</a-button>
</template>

<script>
  import { getCurrentInstance } from 'vue'
  export default {
    setup() {
      // 获取上下文，类似原来的this
      const { ctx } = getCurrentInstance()

      let msgClick = () => {
        console.log('kkkkkkkk')
        ctx.$message.error('提示消息')
      }

      return {
        msgClick,
      }
    },
    created() {},
  }
</script>

<style lang="scss" scoped>
  .abc {
    width: 100%;
    height: 10px;
    background: red;
    margin-bottom: 20px;
  }
</style>
